#include "config_parser.h"
#include <stdio.h>
#include <string.h>
#include <direct.h>

/**! Test main
 */
int main(int a,char**arg)
{
	char * value = 0;
	char* ver = 0;
	char path[256]={0};
	int err = 0;
	char* errstr=0;
	
	CONF_ITEM *cfg = init();
	
	ver = get_version();
	printf("%s\n",ver);
	
	getcwd(path,256);
	strcat(path,PATH_SEPORATOR);
	strcat(path,"a.conf");
	printf("%s\n",path);
	value = get_config(cfg,"zone");
	
	err = read_config(cfg,path);
	errstr = get_error_string(err);
	printf("%s\n",errstr);
	
	value=get_config(cfg,"main output");
	printf("main output:%s\n",value);
	
	value = get_config(cfg,"timeout");
	printf("timeout:%s\n",value);
	
	value = get_config(cfg,"language");
	printf("language:%s\n",value);
	
	value = get_config(cfg,"home");
	printf("home:%s\n",value);

	deinit(cfg);
	return 0;
}
